<template>
  <div class="home">
    <h1>欢迎使用赛事数据管理系统</h1>
    <p>这是一个基于 Vue 3 + Element Plus + VXE Table 的赛事数据管理应用</p>
    
    <el-row :gutter="20" style="margin-top: 30px;">
      <el-col :span="8">
        <el-card class="nav-card" @click="goToTest">
          <div class="nav-content">
            <el-icon size="40" color="#409eff">
              <Grid />
            </el-icon>
            <h3>组件测试</h3>
            <p>测试 Element Plus 和 VXE Table 组件</p>
          </div>
        </el-card>
      </el-col>
      
      <el-col :span="8">
        <el-card class="nav-card" @click="goToAbout">
          <div class="nav-content">
            <el-icon size="40" color="#67c23a">
              <InfoFilled />
            </el-icon>
            <h3>关于我们</h3>
            <p>了解项目技术栈和功能</p>
          </div>
        </el-card>
      </el-col>
      
      <el-col :span="8">
        <el-card class="nav-card">
          <div class="nav-content">
            <el-icon size="40" color="#e6a23c">
              <Trophy />
            </el-icon>
            <h3>赛事管理</h3>
            <p>管理赛事数据和比赛信息</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const goToTest = () => {
  router.push('/test')
}

const goToAbout = () => {
  router.push('/about')
}
</script>

<style scoped>
.home {
  padding: 20px;
  text-align: center;
  height: 100%;
  overflow-y: auto;
}

h1 {
  color: #409eff;
  margin-bottom: 20px;
}

p {
  color: #666;
  font-size: 16px;
}

.nav-card {
  cursor: pointer;
  transition: all 0.3s ease;
  height: 200px;
}

.nav-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-content {
  text-align: center;
  padding: 20px;
}

.nav-content h3 {
  margin: 15px 0 10px 0;
  color: #333;
}

.nav-content p {
  color: #666;
  font-size: 14px;
  margin: 0;
}
</style>
